package com.zhq.blog.core.domain.other;

import javax.persistence.Entity;
import javax.persistence.Transient;

import com.zhq.blog.core.domain.BasePersistentDomain;
import com.zhq.blog.core.domain.user.User;

/**
 * @title:InternalMessage.java
 * @package com.zhq.blog.core.domain.other
 * @author 张恒强
 * @date 2014年12月26日 上午10:30:12
 * @version V1.0
 */
@Entity
public class InternalMessage extends BasePersistentDomain<InternalMessageRepository>{
	
	private long fromUserId;
	
	private long toUserId;
	
	private String message;
	
	private boolean isRead = false;
	
	@Transient
	private User fromUser;
	
	public InternalMessage(long fromUserId, long toUserId, String message) {
		super();
		this.fromUserId = fromUserId;
		this.toUserId = toUserId;
		this.message = message;
	}

	public InternalMessage() {
		super();
	}

	
	public User getFromUser() {
		return fromUser;
	}

	public void setFromUser(User fromUser) {
		this.fromUser = fromUser;
	}

	public long getFromUserId() {
		return fromUserId;
	}

	public void setFromUserId(long fromUserId) {
		this.fromUserId = fromUserId;
	}

	public long getToUserId() {
		return toUserId;
	}

	public void setToUserId(long toUserId) {
		this.toUserId = toUserId;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public boolean getIsRead() {
		return isRead;
	}

	public void setIsRead(boolean isRead) {
		this.isRead = isRead;
	}
	
}
